package hDOJ;

/*
3 3 1 2 3 1 4 7
3 7 2 5 8 2 3 4 5 6 7 8 
0 0


2 3 
NULL

*/



import java.util.Scanner;
import java.util.TreeSet;


public class Main2034 {
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()) {
			int m = sc.nextInt();
			int n = sc.nextInt();
			if(m==0 && n==0) {
				continue;
			}
			TreeSet<Integer> setA = new TreeSet<Integer>();
			TreeSet<Integer> setB = new TreeSet<Integer>();
			//TreeSet<Integer> setAB = new TreeSet<Integer>();
			//接收数据存入set
			for(int i = 0; i < m; i++) {
				int num = sc.nextInt();
				setA.add(num);
			}for(int i = 0; i < n; i++) {
				int num = sc.nextInt();
				setB.add(num);
			}
			//A删掉A交B的部分
			setA.removeAll(setB);
			/*
			//求A交B
			for(Integer numA : setA) {
				for(Integer numB : setB) {
					if(numA == numB) {
						setAB.add(numA);
						break;
					}
				}
			}//A删掉A交B的部分
			for(Integer numAB : setAB) {
				setA.remove(numAB);
			}*/
			//A空
			if(setA.isEmpty()) {
				System.out.println("NULL");
				//continue;
			}
			//A排序
			setA.comparator();
			//遍历输出A中元素
			for(Integer numA : setA) {
				System.out.print(numA + " ");
			}System.out.println();
		}
	}
}
